package com.koron.order.maintain.service;

import com.github.pagehelper.PageInfo;
import com.koron.bean.query.PageQuery;
import com.koron.common.core.business.common.service.CommonService;
import com.koron.order.common.bean.po.OrderDispatch;
import com.koron.order.maintain.bean.dto.MaintainDetailDto;
import com.koron.order.maintain.bean.dto.MaintainTwinDto;
import com.koron.order.maintain.bean.entity.MaintainPo;
import com.koron.order.maintain.bean.query.MaintainQuery;
import com.koron.order.maintain.bean.vo.MaintainDetailVo;
import com.koron.order.maintain.bean.vo.MaintainVo;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;

/**
 * (Maintain)表服务接口
 *
 * @author zhouj
 * @since 2021-09-13 17:42:14
 */
public interface MaintainService extends CommonService {

    String insertOrUpdate(SessionFactory factory, MaintainDetailDto dto);

    int insert(SessionFactory factory, MaintainPo maintain);

    int update(SessionFactory factory, MaintainPo maintain);

    boolean updateStatus(SessionFactory factory, String id, String status);

    int deleteById(SessionFactory factory, String id);

    MaintainDetailVo queryById(SessionFactory factory, String id);

    List<MaintainVo> queryByPlanId(SessionFactory factory, String planId);

    MaintainPo queryMaintainBeanById(SessionFactory factory, String id);

    PageInfo queryList(SessionFactory factory, MaintainQuery query, PageQuery pageQuery);

    int submitMaintain(SessionFactory factory, String maintainId, String status, OrderDispatch dto);

    int submitTicketMaintain(SessionFactory factory, String maintainId, String status);

    String deprecated(SessionFactory factory, String orderId);

    MaintainTwinDto queryTwin(SessionFactory factory, String eqId);
}
